export default {
    lazy:function(el,binding){
        var newImage=new Image();
        newImage.src= binding.value;
        newImage.onload=function(){
            console.log(el.tagName);
            // if(el.src){
            // }
            if(el.tagName=="IMG"){
                el.src=binding.value;
                el.style.objectFit="cover";
            }else{
                el.style.backgroundImage="url("+binding.value+")";
                el.style.backgroundSize="cover";
            }
            
        }
    }
}